<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <h:outputStylesheet name="./css/login.css"/>
    </h:head>
    <h:body>
        <div class="conteiner">
            <p:messages id="messages" showDetail="true" closable="true" autoUpdate="true"/>
            <h:form id="formLogin">
                <p:panel>
                    <h:panelGrid columns="2" cellpadding="5">
                        <h:outputLabel for="username" value="Tên:"/>
                        <p:inputText value="#{staffLoginController.username}" id="username" label="username"/>

                        <h:outputLabel for="password" value="Mật khẩu:"/>
                        <p:password value="#{staffLoginController.password}" id="password" label="password"/>

                        <f:facet name="footer">
                            <p:commandButton id="loginButton" value="Đăng nhập" update=":messages" 
                                             action="#{staffLoginController.login()}"/>
                        </f:facet>
                    </h:panelGrid>
                </p:panel>
            </h:form>
        </div>
        
    </h:body>
</html>